#pragma  once

#include "Graphic.h"

class Font;
class GlyphMetrics;
class TextStyle {
public:
	Font font;
	Color foreground;
	Color background;
	bool underline;
	Color underlineColor;

	/**
	 * the underline style. This style is ignored when
	 * <code>underline</code> is false.
	 * <p>
	 * This value should be one of <code>SWT.UNDERLINE_SINGLE</code>,
	 * <code>SWT.UNDERLINE_DOUBLE</code>, <code>SWT.UNDERLINE_ERROR</code>,
	 * or <code>SWT.UNDERLINE_SQUIGGLE</code>.
	 * </p>
	 *
	 * @see SWT#UNDERLINE_SINGLE
	 * @see SWT#UNDERLINE_DOUBLE
	 * @see SWT#UNDERLINE_ERROR
	 * @see SWT#UNDERLINE_SQUIGGLE
	 * @see SWT#UNDERLINE_LINK
	 *
	 * @since 3.4
	 */
	int underlineStyle;
	bool strikeout;
	Color strikeoutColor;

	/**
	 * the border style. The default border style is <code>SWT.NONE</code>.
	 * <p>
	 * This value should be one of <code>SWT.BORDER_SOLID</code>,
	 * <code>SWT.BORDER_DASH</code>,<code>SWT.BORDER_DOT</code> or
	 * <code>SWT.NONE</code>.
	 * </p>
	 *
	 * @see SWT#BORDER_SOLID
	 * @see SWT#BORDER_DASH
	 * @see SWT#BORDER_DOT
	 * @see SWT#NONE
	 *
	 * @since 3.4
	 */
	int borderStyle;
	Color borderColor;

	// the GlyphMetrics of the style
	GlyphMetrics metrics;

	// the baseline rise of the style.
	int rise;
	/**
	 * the data. An user data field. It can be used to hold the HREF when the range
	 * is used as a link or the embed object when the range is used with <code>GlyphMetrics</code>.
	 * <p>
	 *
	 * @since 3.5
	 */
	//Object data;
public:
	virtual ~TextStyle() {
	}
	TextStyle() {
	}
	TextStyle(Font font, Color foreground, Color background) {
		this->font = font;
		this->foreground = foreground;
		this->background = background;
	}

	TextStyle(const TextStyle& style) {

		font = style.font;
		foreground = style.foreground;
		background = style.background;
		underline = style.underline;
		underlineColor = style.underlineColor;
		underlineStyle = style.underlineStyle;
		strikeout = style.strikeout;
		strikeoutColor = style.strikeoutColor;
		borderStyle = style.borderStyle;
		borderColor = style.borderColor;
		metrics = style.metrics;
		rise = style.rise;
		//data = style.data;
	}
};
